Loss function

During training or testing, a mathematical function that calculates the loss on a batch of examples. A loss function returns a lower loss for models that makes good predictions than for models that make bad predictions.1

The goal of training is typically to minimize the loss that a loss function returns.1

Many different kinds of loss functions exist. Pick the appropriate loss function for the kind of model you are building. For example:1

Footnotes

  1. developers.google.com/machine-learning/glossary#loss-function 2 3

2024 © ak